package com.lill.workflow.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.lill.workflow.model.WorkflowEmployeeModel;
import com.lill.workflow.model.WorkflowInfoModel;

/**
 * Service接口
 *
 * @author lill
 * @date 2019-05-26 12:05:20
 */
public interface IWorkflowInfoService {

    /**
     * 根据主键查询实体
     *
     * @param id 主键
     * @return 实体
     */
    WorkflowInfoModel queryObject(String id);
    int selectCurrentSum(String id);
    /**
     * 分页查询
     *
     * @param map 参数
     * @return list
     */
    List<WorkflowInfoModel> queryList(Map<String, Object> map);
    List<WorkflowInfoModel> queryListByOther(Map<String, Object> map);

    /**
     * 分页统计总数
     *
     * @param map 参数
     * @return 总数
     */
    int queryTotal(Map<String, Object> map);

    /**
     * 保存实体
     *
     * @param workflowInfo 实体
     * @return 保存条数
     */
    int save(WorkflowInfoModel workflowInfo);
    
    int save(WorkflowInfoModel workflowInfo,boolean hasRepeat);
    /**
     * 根据主键更新实体
     *
     * @param workflowInfo 实体
     * @return 更新条数
     */
    int update(WorkflowInfoModel workflowInfo);
    
    /**
     * 逻辑删除
     * @param map
     * @return
     */
    int deleteLogicByMap(Map<String, Object> map);

    List<WorkflowEmployeeModel> queryEmployeeFormal(HashMap<String, Object> paramsMap);
    List<WorkflowEmployeeModel> queryEmployeeRenew(HashMap<String, Object> paramsMap);
    WorkflowEmployeeModel queryEmployeeFormalByName(Map<String, Object> hashMap);
    List<WorkflowEmployeeModel> queryEmployeeFormalBoth(HashMap<String, Object> paramsMap);
    List<WorkflowEmployeeModel> queryEmployeeQuit(HashMap<String, Object> paramsMap);
    WorkflowEmployeeModel queryFirstStep(String workflowId);
    WorkflowEmployeeModel queryStepNext(Map<String, Object> mapNext);

    /**
     * 根据流程编码查询所有审核人
     * @param hashMap
     * @return
     */
    List<WorkflowEmployeeModel> querySteps(Map<String, Object> hashMap);
}
